proc do_restart {nick host} {
  # Note, the way X-Bot is coded, this command should not exist.  This code is only here for a TCL-only edition
  # of X-Bot.

  global botnick home bcast isXbot

  # Abort immediately if being used as X-Bot, THIS CODE WILL NOT WORK IN X-BOT!!!
  if {$isXbot == "1"} {
    putquick "NOTICE $nick :\0034ERROR - This command is no longer supported in X-Bot."
    return 0
  } else {
    putquick "NOTICE $nick :\0033Restarting..."
  }

  putlog "!$nick ($host)! restart"
  save

  # message every channel
  foreach chan [channels] { 
    putquick "PRIVMSG $chan :\0034I will be restarting in 20 seconds.  I shall return!"
  }

  if {$bcast == "1"} {
    putquick "PRIVMSG $home :\002$nick\002 ($host) requested me to restart."
  }

  utimer 20 restart
  return 0	
}










